package UnOfficeDeTourisme;

/**
 * Interface definition : Site
 * 
 * @author OpenORB Compiler
 */
public class _SiteStub extends org.omg.CORBA.portable.ObjectImpl
        implements Site
{
    static final String[] _ids_list =
    {
        "IDL:UnOfficeDeTourisme/Site:1.0"
    };

    public String[] _ids()
    {
     return _ids_list;
    }

    private final static Class _opsClass = UnOfficeDeTourisme.SiteOperations.class;

    /**
     * Read accessor for idSite attribute
     * @return the attribute value
     */
    public int idSite()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_idSite",true);
                    _input = this._invoke(_output);
                    return _input.read_long();
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_idSite",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.idSite();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for nomSite attribute
     * @return the attribute value
     */
    public String nomSite()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_nomSite",true);
                    _input = this._invoke(_output);
                    return _input.read_string();
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_nomSite",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.nomSite();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for descriptionSite attribute
     * @return the attribute value
     */
    public String descriptionSite()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_descriptionSite",true);
                    _input = this._invoke(_output);
                    return _input.read_string();
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_descriptionSite",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.descriptionSite();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for positionSite attribute
     * @return the attribute value
     */
    public UnOfficeDeTourisme.GPS positionSite()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_positionSite",true);
                    _input = this._invoke(_output);
                    return UnOfficeDeTourisme.GPSHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_positionSite",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.positionSite();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for ouverture attribute
     * @return the attribute value
     */
    public UnOfficeDeTourisme.horaire ouverture()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_ouverture",true);
                    _input = this._invoke(_output);
                    return UnOfficeDeTourisme.horaireHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_ouverture",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.ouverture();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for fermeture attribute
     * @return the attribute value
     */
    public UnOfficeDeTourisme.horaire fermeture()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_fermeture",true);
                    _input = this._invoke(_output);
                    return UnOfficeDeTourisme.horaireHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_fermeture",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.fermeture();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for siteDisponible attribute
     * @return the attribute value
     */
    public boolean siteDisponible()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_siteDisponible",true);
                    _input = this._invoke(_output);
                    return _input.read_boolean();
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_siteDisponible",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.siteDisponible();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for activationPortique attribute
     * @return the attribute value
     */
    public boolean activationPortique()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_activationPortique",true);
                    _input = this._invoke(_output);
                    return _input.read_boolean();
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_activationPortique",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.activationPortique();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for listeDesVisites attribute
     * @return the attribute value
     */
    public UnOfficeDeTourisme.Visite[] listeDesVisites()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_listeDesVisites",true);
                    _input = this._invoke(_output);
                    return UnOfficeDeTourisme.listeVisitesHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_listeDesVisites",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.listeDesVisites();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Read accessor for SGSites attribute
     * @return the attribute value
     */
    public org.omg.CORBA.Any SGSites()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try {
                    org.omg.CORBA.portable.OutputStream _output = this._request("_get_SGSites",true);
                    _input = this._invoke(_output);
                    return UnOfficeDeTourisme.iorHelper.read(_input);
                } catch (final org.omg.CORBA.portable.RemarshalException _exception) {
                    continue;
                } catch (final org.omg.CORBA.portable.ApplicationException _exception) {
                    final String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                } finally {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_SGSites",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.SGSites();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation ajouterVisite
     */
    public void ajouterVisite(UnOfficeDeTourisme.Visite v)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("ajouterVisite",true);
                    UnOfficeDeTourisme.VisiteHelper.write(_output,v);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("ajouterVisite",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    _self.ajouterVisite( v);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation ajouterTypeEntree
     */
    public void ajouterTypeEntree(UnOfficeDeTourisme.Visite visite, UnOfficeDeTourisme.TypeEntree te)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("ajouterTypeEntree",true);
                    UnOfficeDeTourisme.VisiteHelper.write(_output,visite);
                    UnOfficeDeTourisme.TypeEntreeHelper.write(_output,te);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("ajouterTypeEntree",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    _self.ajouterTypeEntree( visite,  te);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation getVisites
     */
    public UnOfficeDeTourisme.Visite[] getVisites()
        throws UnOfficeDeTourisme.ListeVideException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("getVisites",true);
                    _input = this._invoke(_output);
                    UnOfficeDeTourisme.Visite[] _arg_ret = UnOfficeDeTourisme.listeVisitesHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(UnOfficeDeTourisme.ListeVideExceptionHelper.id()))
                    {
                        throw UnOfficeDeTourisme.ListeVideExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("getVisites",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.getVisites();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation majSite
     */
    public void majSite(UnOfficeDeTourisme.horaire ouverture, UnOfficeDeTourisme.horaire fermeture)
        throws UnOfficeDeTourisme.ObjetInconnuException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("majSite",true);
                    UnOfficeDeTourisme.horaireHelper.write(_output,ouverture);
                    UnOfficeDeTourisme.horaireHelper.write(_output,fermeture);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(UnOfficeDeTourisme.ObjetInconnuExceptionHelper.id()))
                    {
                        throw UnOfficeDeTourisme.ObjetInconnuExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("majSite",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    _self.majSite( ouverture,  fermeture);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation calculerStatistiques
     */
    public UnOfficeDeTourisme.statistiques calculerStatistiques()
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("calculerStatistiques",true);
                    _input = this._invoke(_output);
                    UnOfficeDeTourisme.statistiques _arg_ret = UnOfficeDeTourisme.statistiquesHelper.read(_input);
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("calculerStatistiques",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.calculerStatistiques();
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation dejaVisite
     */
    public boolean dejaVisite(UnOfficeDeTourisme.Carte idc)
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("dejaVisite",true);
                    UnOfficeDeTourisme.CarteHelper.write(_output,idc);
                    _input = this._invoke(_output);
                    boolean _arg_ret = _input.read_boolean();
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("dejaVisite",_opsClass);
                if (_so == null)
                   continue;
                UnOfficeDeTourisme.SiteOperations _self = (UnOfficeDeTourisme.SiteOperations) _so.servant;
                try
                {
                    return _self.dejaVisite( idc);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

}
